package com.itheima.controller;

import com.itheima.anno.Log;
import com.itheima.mapper.OperateLogMapper;
import com.itheima.pojo.*;
import com.itheima.service.OperateLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequestMapping("log/page")
@RestController
public class OperateLogController {

    @Autowired
    private OperateLogService operateLogService;
    @Autowired
    private OperateLogMapper operateLogMapper;

    @GetMapping
    public Result list(OperateLogQueryParam logQueryParam){;
        log.info("查询条件:{}",logQueryParam);
        PageResult<OperateLog> pageResult = operateLogService.page(logQueryParam);
        return Result.success(pageResult);
    }
}
